<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html>
<%@include file="../top.jsp"%>


<div class="container-fluid">
	<div class="row-fluid">
		<div class="span2">
          <div class="well sidebar-nav">
          	<ul class="nav nav-list">
          	  <li class="nav-header"><a href="<c:url value="/" />">Welcome</a></li>	
			  <li class="nav-header">Forecast</li>
			  <li><a href="<c:url value="/activity" />">Activities</a></li>			 			
			  <li><a href="<c:url value="/reports" />">Reports</a></li>	
			  </ul>  
          </div><!--/.well -->
		</div>
		<!--/span-->
		<div class="span10">
			<div class="hero-unit">
				<h1>Please enter forecast details</h1>
			</div>
			<div class="row-fluid">
				<div class="span12">
					<div class="container" align="center">
						<form:form id="form" method="post" modelAttribute="forecast"
							class="form-horizontal well">
							<div>
								<c:if test="${not empty message}">
									<div id="message" class="success">${message}</div>
								</c:if>
								<s:bind path="*">
									<c:if test="${status.error}">
										<div id="message" class="error">
											<div class="alert alert-error">
												<h2>Form has errors</h2>
											</div>
										</div>
									</c:if>
								</s:bind>
							</div>
							<fieldset>
								<div
									class="control-group ${requestScope['org.springframework.validation.BindingResult.activity'].hasFieldErrors('defaultPercentage') ? 'error' : ''}">
									<form:label class="control-label" path="hours">
						  				Hours <form:errors path="hours" />
									</form:label>
									<div class="controls">
										<form:input path="hours" />
									</div>
								</div>
							</fieldset>
							<p>
								<button type="submit" class="btn btn-primary">Submit</button>
							</p>
							<input name="activityId" type="hidden" value="${activityId}" />
						</form:form>
					</div>
					<%@include file="../bottom.jsp"%>